#include "ota_http.h"
#include "log/log.h"

int main()
{
    char *json = ota_http_getJson(OTA_URL_FILEINFO);
    log_debug("json: %s", json);
    // 下载文件
    int ret = ota_http_download(OTA_URL_DOWNLOAD, OTA_LOCAL_PATH);
    if (ret != 0)
    {
        log_error("ota_http_download failed");
        return -1;
    }
    log_debug("ota_http_download success");
    return 0;
}